package com.example.redisDemo.test;

public class SortDemo {
	public void select_sort ( int a[ ] ) { 
	    int  i, j, k, t, n = a.length; 
	    for ( i = 0; i<n-1; i++ ) { 
	         k = i; 
	         for( j = i + 1; j < n; j++ ) { 
			  if ( a[j] < a[k] ) 
			          k = j; 
	        } 
	        if ( i != k ) { 
		           t = a[k]; 
		           a[k] = a[i]; 
		           a[i] = t; 
	          } 
	        }
	    } 
}
